import { request } from "../utils/axios"
import { PageListReturnResult } from "../utils/types"

enum DictType {
  HTTP_METHOD = 'api_http_method',
  PARAM_TYPE = 'api_param_type',
  PARAM_SOURCE = 'api_param_source',
  CONTENT_TYPE = 'api_content_type',
  APPRAISAL_TYPE = 'api_appraisal_type',
  AUTH_TYPE = 'api_auth_type',
  SIGN_TYPE = 'api_sign_type',
  HTTP_CODE = 'api_http_code'
}

export default {
  DictType,
  getList (dictType?: DictType): PageListReturnResult {
    return request({
      url: '/framework/data/list',
      params: { dictType }
    })
  }
}
